Skip to content

Added Conditional parameter sets feature#527

Closed
RakeshwarK wants to merge 7 commits into
microsoft:mainfrom
RakeshwarK:rkambaiahgar/ParameterSets
Closed

Added Conditional parameter sets feature#527
RakeshwarK wants to merge 7 commits into
microsoft:mainfrom
RakeshwarK:rkambaiahgar/ParameterSets

Conversation

@RakeshwarK

Copy link
Copy Markdown
Contributor

No description provided.

/// Provides a JSON converter that can handle the serialization/deserialization of
/// <see cref="List{T}"/> objects where T is <see cref="IDictionary{TKey, TValue}"/> with string keys and <see cref="IConvertible"/> values.
/// </summary>
public class ParameterDictionaryListJsonConverter : JsonConverter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming: ParameterDictionaryCollectionJsonConverter

Outcome = evaluatedExpression
});
}),
// Expression: {Architecture}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming: CpuArchitecture.

This is the general name we use throughout the rest of our codebase.

result.ThrowIfInvalid();

// Process conditional parameters (ParametersOn feature)
await this.ProcessParametersOnAsync(profile, dependencies);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly to how there is an extension method ExecutionProfile.Inline(), the logic to determine which parameters should be used from the conditional set should be an extension method as well. You may want to just extend the Inline() method to take in the IServiceCollection.

Recommendation:
I know that there are dependencies in IServiceCollection that cannot be referenced from the VirtualClient.Contracts project. We can likely just move the extensions method class to the VirtualClient.Core project to address the scenario.

@saibulusu saibulusu closed this Aug 22, 2025
@RakeshwarK RakeshwarK deleted the rkambaiahgar/ParameterSets branch January 7, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants